package com.myapp.ruyixing.http;

import org.json.JSONObject;

import com.myapp.ruyixing.model.ShopLogin;

public class ShopLoginParser extends RYJSONParser {
	@Override
	public Object parse(JSONObject jsonObject) {
		if (getErrno(jsonObject) != NO_ERROR) {
			return null;
		}

		ShopLogin login = new ShopLogin();

		ModelParser.parseModel(login, jsonObject);
		JSONObject data = jsonObject.optJSONObject("data");
		login.bduss = data.optString("memberbduss");
		login.username = data.optString("username");
		login.cityid = data.optString("cityid");
		login.cityname = data.optString("cityname");
		login.shopbduss = data.optString("shopbduss");
		login.shopid = data.optString("shopid");
		login.shopname = data.optString("shopname");
		return login;
	}
}
